package com.simple.datax.dao.impl;

import java.util.List;

import org.springframework.stereotype.Repository;

import com.simple.base.dao.BaseDAO;
import com.simple.datax.dao.IDataxFlowActorsDAO;
import com.simple.datax.vo.DataxFlowActorsIdVO;
import com.simple.datax.vo.DataxFlowActorsVO;

@Repository("dataxFlowActorsDAO")
public class DataxFlowActorsDAOImpl extends BaseDAO implements
		IDataxFlowActorsDAO {

	@Override
	public DataxFlowActorsVO findById(DataxFlowActorsIdVO id) {
		return super.get(DataxFlowActorsVO.class, id);
	}

	@Override
	public void saveOrUpdate(DataxFlowActorsVO dataxFlowActorsVO) {
		super.saveOrUpdate(dataxFlowActorsVO);
	}

	@Override
	public void update(DataxFlowActorsVO dataxFlowActorsVO) {
		super.saveOrUpdate(dataxFlowActorsVO);
	}

	@Override
	public List<DataxFlowActorsVO> findAll() {
		return super.query(DataxFlowActorsVO.class);
	}

	@Override
	public void delete(DataxFlowActorsVO dataxFlowActorsVO) {
		super.delete(dataxFlowActorsVO);
	}

	@Override
	public void delete(DataxFlowActorsIdVO id) {
		super.delete(DataxFlowActorsVO.class,id);
	}

	@Override
	public List<Object> findByFlowId(String flowId) {
		String hql="select d,v.ecName  from DataxFlowActorsVO d ,VwDataxEnterpriseVO v where 1>0 and d.eCode=v.ecCode and d.id.flowId=? order by d.id.actorNo asc";
		return  super.query(hql, flowId);
	}

	

}
